package io.renren.modules.generator.service.impl;

import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.generator.dao.UlPlatformActionDao;
import io.renren.modules.generator.entity.UlPlatformActionEntity;
import io.renren.modules.generator.service.UlPlatformActionService;


@Service("ulPlatformActionService")
public class UlPlatformActionServiceImpl extends ServiceImpl<UlPlatformActionDao, UlPlatformActionEntity> implements UlPlatformActionService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String channelNo = (String)params.get("channelNo");

        IPage<UlPlatformActionEntity> page = this.page(
                new Query<UlPlatformActionEntity>().getPage(params),
                new QueryWrapper<UlPlatformActionEntity>()
                        .eq(StringUtils.isNotBlank(channelNo),"channel_no", channelNo)
        );

        return new PageUtils(page);
    }

}